﻿#include "PostGraphWidgetBoxCallBack.h"

#include <vtkBoxWidget2.h>
#include <vtkBoxRepresentation.h>

namespace Interface
{
    void PostGraphWidgetBoxCallBack::Execute(vtkObject * caller, unsigned long eventId, void * callData)
    {
        vtkBoxWidget2* widget = vtkBoxWidget2::SafeDownCast(caller);
        if (widget == nullptr)return;
        vtkBoxRepresentation* rep = vtkBoxRepresentation::SafeDownCast(widget->GetRepresentation());
        if (rep == nullptr)return;
        double* bounds;
        bounds = rep->GetBounds();
        emit sigValueChange(bounds);
    }
}
